package com.itheima.day06;

public class ArraySmall {
    public static void main(String[] args) {
        /*//定义二维数组
        int[][] arr = new int[2][3];
        //定义一维数组
        int[] samllArray = {11, 22, 33, 44};
        //用一维数组替换二维数组的1号索引对应的地址值
        arr[1] = samllArray ;
        //打印二维数组1号索引对应的3号元素
             System.out.println(arr[1][3]);*/

        int[] arr1 = {11, 22, 33};
        int[] arr2 = {44, 55, 66};
        int[][] arr = {arr1, arr2};
        System.out.println(arr[0][1]);
        int max = 0;
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j] + " ");
                if (arr[i][j] > max) {
                    max = arr[i][j];
                }
            }
        }
        System.out.println();
        System.out.println("最大值:"+max);
    }
}